<%@ page import="hp.com.entity.Users" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<%
    String path = request.getContextPath();
    request.setAttribute("path",path);
    request.setAttribute("pageNo",request.getParameter("pageNo"));
    Users userSession =(Users) request.getSession().getAttribute("userSession");
%>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="${path}/jbs/css/style.css" />
    <!--[if IE 6]>
    <script src="js/iepng.js" type="text/javascript"></script>
    <script type="text/javascript">
        EvPNG.fix('div, ul, img, li, input, a');
    </script>
    <![endif]-->
    <script type="text/javascript" src="${path}/jbs/js/jquery-1.11.1.min_044d0927.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/jquery.bxslider_e88acd1b.js"></script>

    <script type="text/javascript" src="${path}/jbs/js/jquery-1.8.2.min.js"></script>
    <script type="text/javascript" src="${path}/jbs/js/menu.js"></script>

    <script type="text/javascript" src="${path}/jbs/js/lrscroll_1.js"></script>


    <script type="text/javascript" src="${path}/jbs/js/n_nav.js"></script>

    <script type="text/javascript" src="${path}/jbs/js/s_ban.js"></script>
    <link rel="icon" href="<%=path%>/jbs/images/ico.ico" type="image/x-icon">
    <title>产品列表-青鸟优选</title>
    <style>
        .licss{
            background-color: #02A4F8
        }
    </style>
</head>

<body style="background-color: #f9f9f9">
<!--Begin Header Begin-->
<div class="soubg">
    <div class="sou">
        <span class="fr">
        	<span class="fl">
                <c:choose>
                    <c:when test="<%= userSession == null%>">
                        <a href="${path}/jbs/Regist.jsp" style="color:  #02A4F8;">免费注册</a>&nbsp;|&nbsp;
                          <a href="${path}/jbs/Login.jsp" style="color:  #02A4F8;">马上登录</a>
                    </c:when>
                    <c:otherwise>
                        <%=userSession.getLoginname()%> |&nbsp;<a href="${path}/User">个人中心</a> | <a href="${path}/Orders">我的订单</a> |
                    </c:otherwise>
                </c:choose>&nbsp;
            </span>
        </span>
    </div>
</div>
<div class="top">
    <div class="logo"><a href="<%=path%>/Index"><img src="${path}/jbs/images/logo.png" /></a></div>
    <div class="search">
        <form>
            <input type="text" value="" class="s_ipt" />
            <input type="submit" value="搜索" class="s_btn" />
        </form>
    </div>
    <div class="i_car">
        <a href="${path}/Cart"><div class="car_t">购物车</div></a>
        <%--        <div class="car_bg">--%>
        <%--       		<!--Begin 购物车未登录 Begin-->--%>
        <%--            <div class="un_login">--%>
        <%--                <c:choose>--%>
        <%--                    <c:when test="<%= userSession == null%>">--%>
        <%--                          <a href="${path}/jbs/Login.jsp" style="color:  #02A4F8;">马上登录</a>--%>
        <%--                    </c:when>--%>
        <%--                    <c:otherwise>--%>
        <%--                        <a href="${path}/User"><%=userSession.getLoginname()%></a>--%>
        <%--                    </c:otherwise>--%>
        <%--                </c:choose>--%>
        <%--                <a href="${path}/Cart">查看购物车！</a>--%>
        <%--            </div>--%>
        <%--        </div>--%>
    </div>
</div>
<!--End Header End-->
<!--Begin Menu Begin-->
<div class="menu_bg">
    <div class="menu">
        <!--Begin 商品分类详情 Begin-->
        <!--End 商品分类详情 End-->
        <ul class="menu_r"id="myul">
            <li><a href="${path}/AllProducts?pageNo=1" >全部</a></li>
            <li><a href="${path}/Types?category=14&pageNo=1" id="m0">学习</a></li>
            <li ><a href="${path}/Types?category=1&pageNo=1" id="m1">食品</a></li>
            <li ><a href="${path}/Types?category=2&pageNo=1"id="m2">化妆品</a></li>
            <li ><a href="${path}/Types?category=3&pageNo=1"id="m3">服装</a></li>
            <li ><a href="${path}/Types?category=4&pageNo=1"id="m4">家居</a></li>
            <li ><a href="${path}/Types?category=5&pageNo=1"id="m5">数码产品</a></li>
        </ul>
    </div>
</div>
<!--End Menu End-->
<div class="i_bg">
    <!--Begin Banner Begin-->
    <script type="text/javascript">
        //var jq = jQuery.noConflict();
        (function(){
            $(".bxslider").bxSlider({
                auto:true,
                prevSelector:jq(".top_slide_wrap .op_prev")[0],nextSelector:jq(".top_slide_wrap .op_next")[0]
            });
        })();
    </script>
    <!--End Banner End-->

    <div class="content mar_10">
        <!--Begin 特卖 Begin-->
        <div class="s_left">
            <div class="brand_t">商品特卖</div>
            <ul class="p_sell">
                <c:forEach items="${page.pageList}" var="list">
                    <li>
                        <div class="img"><a href="<%=path%>/details?id=${list.id}"><img src="${list.picName}" width="160" height="140" /></a></div>
                        <a href="<%=path%>/details?id=${list.id}"><div class="name">${list.easyName}</div>
                            <div class="price">
                                    ${list.description}
                            </div></a>
                        <div class="ch_bg">
                            <span class="ch_txt">￥<font>${list.sukPrice}</font></span>
                            <a href="<%=path%>/details?id=${list.id}" class="ch_a">查看</a>
                        </div>
                    </li>
                </c:forEach>
            </ul>
            <p align="center" class="pageNav">
                <c:if test="${pageNo!=1&&pageNo!=null}">
                <a href="${path}/Types?category=${cate}&&pageNo=1">首页</a>
                <a href="${path}/Types?category=${cate}&&pageNo=${page.pageNo -1 <=1? 1:page.pageNo -1}">上一页</a>
                </c:if>
                <c:forEach  begin="1" end="${page.pageNum}" varStatus="i">
                    <c:if test="${i.index==page.pageNo}">
                        <style>
                            #pageId_${i.index}:hover{
                                animation: none !important;
                            }
                        </style>
                    </c:if>
                    <a id="pageId_${i.index}" href="${path}/Types?category=${cate}&&pageNo=${i.index}" <c:if test="${i.index==page.pageNo}">style="background-color: #02A4d9;color: white"</c:if> >${i.index}</a>
                </c:forEach>
                <c:if test="${pageNo!=page.pageNum}">
                <a href="${path}/Types?category=${cate}&&pageNo=${page.pageNo +1 >=page.pageNum?page.pageNum:page.pageNo +1}">下一页</a>
                <a href="${path}/Types?category=${cate}&&pageNo=${page.pageNum}">末页</a>
                </c:if>
                    </p>
        </div>
        <!--End 特卖 End-->

    </div>



    <!--Begin Footer Begin -->
    <div class="b_btm_bg bg_color">
        <div class="b_btm">
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="${path}/jbs/images/b1.png" width="62" height="62" /></td>
                    <td><h2>正品保障</h2>正品行货  放心购买</td>
                </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="${path}/jbs/images/b2.png" width="62" height="62" /></td>
                    <td><h2>满38包邮</h2>满38包邮 免运费</td>
                </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="${path}/jbs/images/b3.png" width="62" height="62" /></td>
                    <td><h2>天天低价</h2>天天低价 畅选无忧</td>
                </tr>
            </table>
            <table border="0" style="width:210px; height:62px; float:left; margin-left:75px; margin-top:30px;" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="72"><img src="${path}/jbs/images/b4.png" width="62" height="62" /></td>
                    <td><h2>准时送达</h2>收货时间由你做主</td>
                </tr>
            </table>
        </div>
    </div>
    <div class="btmbg">
        <div class="btm">
            <a href="https://beian.miit.gov.cn">备案/许可证编号：鄂ICP备20008779号-1</a> <br />本站仅供个人学习实践，无实际购买功能
        </div>
    </div>
    <!--End Footer End -->
</div>

</body>
<script >
    var cate =${cate};
    $("#myul li a").css("background-color","#f9f9f9");
    if(cate==1){
        $("#m1").css({"background-color":"#02a4d9","color":"white",});
        $("#m1").append("<style>#m1:hover{animation:none !important;}</style>")
    }else if(cate ==2){
        $("#m2").css({"background-color":"#02a4d9","color":"white"});
        $("#m2").append("<style>#m2:hover{animation:none !important;}</style>");
    }else if(cate ==3){
        $("#m3").css({"background-color":"#02a4d9","color":"white"});
        $("#m3").append("<style>#m3:hover{animation:none !important;}</style>");
    }else if(cate ==4){
        $("#m4").css({"background-color":"#02a4d9","color":"white"});
        $("#m4").append("<style>#m4:hover{animation:none !important;}</style>");
    }else if(cate ==5){
        $("#m5").css({"background-color":"#02a4d9","color":"white"});
        $("#m5").append("<style>#m5:hover{animation:none !important;}</style>");
    }else if(cate==14){
        $("#m0").css({"background-color":"#02a4d9","color":"white"});
        $("#m0").append("<style>#m0:hover{animation:none !important;}</style>");
    }

</script>
</html>
